package com.xhu.service.impl;



import com.xhu.bean.pojo.saleperform;
import com.xhu.dao.SgDao;
import com.xhu.dao.impl.SgDaoImpl;
import com.xhu.service.SgService;

import java.util.List;

public class SgServiceImpl implements SgService {
    private SgDao sgDao=new SgDaoImpl();
    @Override
    public List<saleperform> queryPage(Integer page, Integer limit) {
        Integer start=(page-1)*limit;
        return sgDao.queryPage(start,limit);
    }

    @Override
    public boolean add(saleperform saleperform) {

            return sgDao.add(saleperform)>0;

    }

    @Override
    public boolean del(String saleperform_id) {
        return sgDao.del(saleperform_id)>0;
    }

    @Override
    public boolean upData(saleperform saleperform, String saleperform_id) {
        return sgDao.upData(saleperform,saleperform_id)>0;
    }

    @Override
    public List<saleperform> queryPage(Integer page, Integer limit, String search_name) {
        Integer start=(page-1)*limit;
        return sgDao.queryPage(start,limit,search_name);
    }
}
